<?php echo $header; ?>

<div class="page">
  <div class="personal_info">
      Welcome,<span id="userName"><?php echo $this->customer->getLastName() ?></span>
          <a href="index.php?route=account/logout">logout</a>
    </div>
  <div class="greenPanel">
    <table width="95%" cellpadding="0" cellspacing="0" align="center" style="margin:auto;">
      <tr>
        <td colspan="3" align="left" height="50px">
          <a href="javascript:void(0)" style="float:left;background:url(catalog/view/theme/default/images/agreeItem.png);padding:8px 70px 17px 62px;">Account</a>
        </td>
      </tr>
      <tr>
        <?php echo $left; ?>
        <td style="height:500px;" valign="top" class="ManageMain">
          <ul>
            <li>Account Information</li>
          </ul>

          <table width="100%" cellpadding="0" cellspacing="0" class="list" style="display: table">
            <thead>
              <tr>
                <th class="left" colspan="2"><?php echo $text_return_detail; ?></th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td class="left" style="width: 50%;"><?php echo $text_return_id; ?> #<?php echo $return_id; ?>                  </td>
                <td class="left" style="width: 50%;"><?php echo $text_order_id; ?> #<?php echo $order_id; ?>
                  </td>
              </tr>
              <tr>
                <td><?php echo $text_date_added; ?> <?php echo $date_added; ?></td>
                <td><?php echo $text_date_ordered; ?> <?php echo $date_ordered; ?></td>
              </tr>
            </tbody>
          </table>
          <table width="100%" cellpadding="0" cellspacing="0" class="list" style="display: table">
            <thead>
              <tr>
                <th class="left" colspan="3"><?php echo $text_product; ?></th>
              </tr>
              <tr>
                <td class="left" style="width: 33.3%;"><?php echo $column_product; ?></td>
                <td class="left" style="width: 33.3%;"><?php echo $column_model; ?></td>
                <td class="right" style="width: 33.3%;"><?php echo $column_quantity; ?></td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td class="left"><?php echo $product; ?></td>
                <td class="left"><?php echo $model; ?></td>
                <td class="right"><?php echo $quantity; ?></td>
              </tr>
            </tbody>
          </table>
          <table width="100%" cellpadding="0" cellspacing="0" class="list" style="display: table">
            <thead>
              <tr>
                <th class="left" colspan="3"><?php echo $text_return_detail; ?></th>
              </tr>
              <tr>
                <td class="left" style="width: 33.3%;"><?php echo $column_reason; ?></td>
                <td class="left" style="width: 33.3%;"><?php echo $column_opened; ?></td>
                <td class="left" style="width: 33.3%;"><?php echo $column_action; ?></td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td class="left"><?php echo $reason; ?></td>
                <td class="left"><?php echo $opened; ?></td>
                <td class="left"><?php echo $action; ?></td>
              </tr>
            </tbody>
          </table>
          <?php if ($comment) { ?>
          <table width="100%" cellpadding="0" cellspacing="0" class="list" style="display: table">
            <thead>
              <tr>
                <th class="left"><?php echo $text_comment; ?></th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td class="left"><?php echo $comment; ?></td>
              </tr>
            </tbody>
          </table>
          <?php } ?>
          <?php if ($histories) { ?>
          <table width="100%" cellpadding="0" cellspacing="0" class="list" style="display: table">
            <thead>
              <tr>
                <th class="left" colspan="3"><?php echo $text_history; ?></th>
              </tr>
              <tr>
                <td class="left" style="width: 33.3%;"><?php echo $column_date_added; ?></td>
                <td class="left" style="width: 33.3%;"><?php echo $column_status; ?></td>
                <td class="left" style="width: 33.3%;"><?php echo $column_comment; ?></td>
              </tr>
            </thead>
            <tbody>
              <?php foreach ($histories as $history) { ?>
              <tr>
                <td class="left"><?php echo $history['date_added']; ?></td>
                <td class="left"><?php echo $history['status']; ?></td>
                <td class="left"><?php echo $history['comment']; ?></td>
              </tr>
              <?php } ?>
            </tbody>
          </table>
          <?php } ?>
        </td>
      </tr>
    </table>
  </div>
</div>
<?php echo $footer; ?>